<template>
  <div>
    <NavBar title="我的地址"/>
    <van-address-list
      v-model="chosenAddressId"
      :list="list"
      default-tag-text="默认"
      @add="onAdd"
      @edit="onEdit"
    >
    </van-address-list>
  </div>
</template>

<script>
  import NavBar from '@/components/navBar'
  export default{
    name:'Address',
    components:{
      NavBar
    },
    data() {
      return {
        chosenAddressId: '1',
        list: [
          {
            id: '1',
            name: '张三',
            tel: '13000000000',
            address: '浙江省杭州市西湖区文三路 138 号东方通信大厦 7 楼 501 室',
            isDefault: true,
          }
        ],
      }
    },
    methods:{

      onAdd() {
        this.$router.push('/confirmorder/address/addAddress')
      },
      onEdit(item, index) {
        console.log(1111)
      },
    }
  }
</script>

<style scoped>
  
</style>
